var c = $("#myContent").height();
var header = $("#myheader1").height();
var __TEST_DATA__ = [

[ "010-0", "马萨", "Jerry", "Keith", 50, 57, 80, 46, "2008-10-02" ],
		[ "010-1", "SP", "Charles", "Marks", 79, 37, 40, 90, "2008-04-24" ],
		[ "010-2", "SP", "Vincent", "Harrison", 91, 75, 31, 40, "2008-02-17" ],
		[ "020-3", "RA", "Edward", "Sidney", 61, 31, 80, 47, "2008-10-16" ],
		[ "020-4", "CA", "Patrick", "Solomon", 82, 70, 33, 38, "2008-04-21" ],
		[ "020-5", "MA", "Leopold", "Glendon", 90, 77, 98, 36, "2008-08-07" ],
		[ "030-6", "SP", "Terence", "Edwin", 64, 47, 84, 41, "2008-10-04" ],
		[ "030-7", "SP", "Brent", "Mike", 35, 73, 97, 83, "2008-03-02" ],
		[ "030-8", "UK", "Sammy", "Kenneth", 91, 41, 31, 64, "2008-06-24" ],
		[ "040-9", "CA", "Evan", "Chris", 66, 76, 43, 63, "2008-04-04" ],
		[ "040-10", "IN", "Robin", "Samuel", 63, 49, 85, 68, "2008-07-11" ],
		[ "040-11", "MA", "Glendon", "Oscar", 94, 96, 62, 33, "2008-11-16" ],
		[ "050-12", "MA", "Coli", "Peter", 76, 86, 77, 67, "2008-12-12" ],
		[ "050-13", "MA", "James", "Benson", 88, 96, 56, 33, "2008-11-16" ],
		[ "050-14", "UK", "Frank", "Lance", 87, 85, 47, 66, "2008-10-21" ],
		[ "060-15", "MA", "Bill", "Donald", 64, 70, 76, 87, "2008-03-06" ],
		[ "060-16", "CA", "Sean", "Hunk", 50, 45, 46, 72, "2008-09-18" ],
		[ "060-17", "IN", "Kenny", "Bob", 62, 64, 61, 61, "2008-01-19" ],
		[ "070-18", "US", "Jason", "Coli", 72, 92, 56, 41, "2008-11-20" ],
		[ "070-19", "IN", "Bruce", "Ivan", 68, 62, 66, 78, "2008-02-13" ],
		[ "070-20", "SP", "Sam", "Vern", 93, 66, 85, 71, "2008-12-18" ],
		[ "080-21", "US", "Brian", "Leopold", 45, 70, 52, 39, "2008-11-07" ],
		[ "080-22", "CA", "Leander", "Caspar", 62, 94, 53, 88, "2008-03-18" ],
		[ "080-23", "SP", "Justin", "Joe", 38, 97, 35, 74, "2008-07-31" ],
		[ "090-24", "UK", "Coli", "Thomas", 55, 58, 62, 46, "2008-07-19" ],
		[ "090-25", "MA", "Gino", "Andrew", 33, 52, 68, 67, "2008-11-11" ],
		[ "090-26", "SP", "Brant", "Gary", 61, 54, 62, 42, "2008-08-16" ],
		[ "100-27", "RA", "Ryan", "Bob", 83, 50, 34, 46, "2008-12-01" ],
		[ "100-28", "US", "Gavin", "Johnny", 45, 56, 36, 79, "2008-02-23" ],
		[ "100-29", "CA", "Randolph", "Carl", 59, 42, 65, 47, "2008-09-20" ],
		[ "100-0", "MA", "Jerry", "Keith", 50, 57, 80, 46, "2008-10-02" ],
		[ "100-1", "SP", "Charles", "Marks", 79, 37, 40, 90, "2008-04-24" ],
		[ "100-2", "SP", "Vincent", "Harrison", 91, 75, 31, 40, "2008-02-17" ],
		[ "110-3", "RA", "Edward", "Sidney", 61, 31, 80, 47, "2008-10-16" ],
		[ "110-4", "CA", "Patrick", "Solomon", 82, 70, 33, 38, "2008-04-21" ],
		[ "110-5", "MA", "Leopold", "Glendon", 90, 77, 98, 36, "2008-08-07" ],
		[ "120-6", "SP", "Terence", "Edwin", 64, 47, 84, 41, "2008-10-04" ],
		[ "120-7", "SP", "Brent", "Mike", 35, 73, 97, 83, "2008-03-02" ],
		[ "120-8", "UK", "Sammy", "Kenneth", 91, 41, 31, 64, "2008-06-24" ],
		[ "130-9", "CA", "Evan", "Chris", 66, 76, 43, 63, "2008-04-04" ],
		[ "130-10", "IN", "Robin", "Samuel", 63, 49, 85, 68, "2008-07-11" ],
		[ "130-11", "MA", "Glendon", "Oscar", 94, 96, 62, 33, "2008-11-16" ],
		[ "140-12", "MA", "Coli", "Peter", 76, 86, 77, 67, "2008-12-12" ],
		[ "140-13", "MA", "James", "Benson", 88, 96, 56, 33, "2008-11-16" ],
		[ "150-14", "UK", "Frank", "Lance", 87, 85, 47, 66, "2008-10-21" ],
		[ "150-15", "MA", "Bill", "Donald", 64, 70, 76, 87, "2008-03-06" ],
		[ "160-16", "CA", "Sean", "Hunk", 50, 45, 46, 72, "2008-09-18" ],
		[ "160-17", "IN", "Kenny", "Bob", 62, 64, 61, 61, "2008-01-19" ],
		[ "170-18", "US", "Jason", "Coli", 72, 92, 56, 41, "2008-11-20" ],
		[ "170-19", "IN", "Bruce", "Ivan", 68, 62, 66, 78, "2008-02-13" ],
		[ "170-20", "SP", "Sam", "Vern", 93, 66, 85, 71, "2008-12-18" ],
		[ "180-21", "US", "Brian", "Leopold", 45, 70, 52, 39, "2008-11-07" ],
		[ "180-22", "CA", "Leander", "Caspar", 62, 94, 53, 88, "2008-03-18" ],
		[ "180-23", "SP", "Justin", "Joe", 38, 97, 35, 74, "2008-07-31" ],
		[ "190-24", "UK", "Coli", "Thomas", 55, 58, 62, 46, "2008-07-19" ],
		[ "190-25", "MA", "Gino", "Andrew", 33, 52, 68, 67, "2008-11-11" ],
		[ "190-26", "SP", "Brant", "Gary", 61, 54, 62, 42, "2008-08-16" ],
		[ "210-27", "RA", "Ryan", "Bob", 83, 50, 34, 46, "2008-12-01" ],
		[ "210-28", "US", "Gavin", "Johnny", 45, 56, 36, 79, "2008-02-23" ],
		[ "210-29", "CA", "Randolph", "Carl", 59, 42, 65, 47, "2008-09-20" ],
		[ "210-0", "MA", "Jerry", "Keith", 50, 57, 80, 46, "2008-10-02" ],
		[ "210-1", "SP", "Charles", "Marks", 79, 37, 40, 90, "2008-04-24" ],
		[ "210-2", "SP", "Vincent", "Harrison", 91, 75, 31, 40, "2008-02-17" ],
		[ "220-3", "RA", "Edward", "Sidney", 61, 31, 80, 47, "2008-10-16" ],
		[ "220-4", "CA", "Patrick", "Solomon", 82, 70, 33, 38, "2008-04-21" ],
		[ "220-5", "MA", "Leopold", "Glendon", 90, 77, 98, 36, "2008-08-07" ],
		[ "230-6", "SP", "Terence", "Edwin", 64, 47, 84, 41, "2008-10-04" ],
		[ "230-7", "SP", "Brent", "Mike", 35, 73, 97, 83, "2008-03-02" ],
		[ "230-8", "UK", "Sammy", "Kenneth", 91, 41, 31, 64, "2008-06-24" ],
		[ "240-9", "CA", "Evan", "Chris", 66, 76, 43, 63, "2008-04-04" ],
		[ "240-10", "IN", "Robin", "Samuel", 63, 49, 85, 68, "2008-07-11" ],
		[ "240-11", "MA", "Glendon", "Oscar", 94, 96, 62, 33, "2008-11-16" ],
		[ "250-12", "MA", "Coli", "Peter", 76, 86, 77, 67, "2008-12-12" ],
		[ "250-13", "MA", "James", "Benson", 88, 96, 56, 33, "2008-11-16" ],
		[ "250-14", "UK", "Frank", "Lance", 87, 85, 47, 66, "2008-10-21" ],
		[ "260-15", "MA", "Bill", "Donald", 64, 70, 76, 87, "2008-03-06" ],
		[ "260-16", "CA", "Sean", "Hunk", 50, 45, 46, 72, "2008-09-18" ],
		[ "260-17", "IN", "Kenny", "Bob", 62, 64, 61, 61, "2008-01-19" ],
		[ "270-18", "US", "Jason", "Coli", 72, 92, 56, 41, "2008-11-20" ],
		[ "270-19", "IN", "Bruce", "Ivan", 68, 62, 66, 78, "2008-02-13" ],
		[ "270-20", "SP", "Sam", "Vern", 93, 66, 85, 71, "2008-12-18" ],
		[ "280-21", "US", "Brian", "Leopold", 45, 70, 52, 39, "2008-11-07" ],
		[ "280-22", "CA", "Leander", "Caspar", 62, 94, 53, 88, "2008-03-18" ],
		[ "280-23", "SP", "Justin", "Joe", 38, 97, 35, 74, "2008-07-31" ],
		[ "290-24", "UK", "Coli", "Thomas", 55, 58, 62, 46, "2008-07-19" ],
		[ "290-25", "MA", "Gino", "Andrew", 33, 52, 68, 67, "2008-11-11" ],
		[ "290-26", "SP", "Brant", "Gary", 61, 54, 62, 42, "2008-08-16" ],
		[ "310-27", "RA", "Ryan", "Bob", 83, 50, 34, 46, "2008-12-01" ],
		[ "310-28", "US", "Gavin", "Johnny", 45, 56, 36, 79, "2008-02-23" ],
		[ "310-29", "CA", "Randolph", "Carl", 59, 42, 65, 47, "2008-09-20" ],
		[ "310-0", "MA", "Jerry", "Keith", 50, 57, 80, 46, "2008-10-02" ],
		[ "310-1", "SP", "Charles", "Marks", 79, 37, 40, 90, "2008-04-24" ],
		[ "310-2", "SP", "Vincent", "Harrison", 91, 75, 31, 40, "2008-02-17" ],
		[ "320-3", "RA", "Edward", "Sidney", 61, 31, 80, 47, "2008-10-16" ],
		[ "320-4", "CA", "Patrick", "Solomon", 82, 70, 33, 38, "2008-04-21" ],
		[ "320-5", "MA", "Leopold", "Glendon", 90, 77, 98, 36, "2008-08-07" ],
		[ "330-6", "SP", "Terence", "Edwin", 64, 47, 84, 41, "2008-10-04" ],
		[ "330-7", "SP", "Brent", "Mike", 35, 73, 97, 83, "2008-03-02" ],
		[ "330-8", "UK", "Sammy", "Kenneth", 91, 41, 31, 64, "2008-06-24" ],
		[ "340-9", "CA", "Evan", "Chris", 66, 76, 43, 63, "2008-04-04" ],
		[ "340-10", "IN", "Robin", "Samuel", 63, 49, 85, 68, "2008-07-11" ],
		[ "340-11", "MA", "Glendon", "Oscar", 94, 96, 62, 33, "2008-11-16" ],
		[ "350-12", "MA", "Coli", "Peter", 76, 86, 77, 67, "2008-12-12" ],
		[ "350-13", "MA", "James", "Benson", 88, 96, 56, 33, "2008-11-16" ],
		[ "350-14", "UK", "Frank", "Lance", 87, 85, 47, 66, "2008-10-21" ],
		[ "360-15", "MA", "Bill", "Donald", 64, 70, 76, 87, "2008-03-06" ],
		[ "360-16", "CA", "Sean", "Hunk", 50, 45, 46, 72, "2008-09-18" ],
		[ "360-17", "IN", "Kenny", "Bob", 62, 64, 61, 61, "2008-01-19" ],
		[ "370-18", "US", "Jason", "Coli", 72, 92, 56, 41, "2008-11-20" ],
		[ "370-19", "IN", "Bruce", "Ivan", 68, 62, 66, 78, "2008-02-13" ],
		[ "370-20", "SP", "Sam", "Vern", 93, 66, 85, 71, "2008-12-18" ],
		[ "380-21", "US", "Brian", "Leopold", 45, 70, 52, 39, "2008-11-07" ],
		[ "380-22", "CA", "Leander", "Caspar", 62, 94, 53, 88, "2008-03-18" ],
		[ "380-23", "SP", "Justin", "Joe", 38, 97, 35, 74, "2008-07-31" ],
		[ "390-24", "UK", "Coli", "Thomas", 55, 58, 62, 46, "2008-07-19" ],
		[ "390-25", "MA", "Gino", "Andrew", 33, 52, 68, 67, "2008-11-11" ],
		[ "390-26", "SP", "Brant", "Gary", 61, 54, 62, 42, "2008-08-16" ],
		[ "410-27", "RA", "Ryan", "Bob", 83, 50, 34, 46, "2008-12-01" ],
		[ "410-28", "US", "Gavin", "Johnny", 45, 56, 36, 79, "2008-02-23" ],
		[ "410-29", "CA", "Randolph", "Carl", 59, 42, 65, 47, "2008-09-20" ]

];
var dsOption = {

	fields : [ {
		name : 'no'
	}, {
		name : 'country'
	}, {
		name : 'customer'
	}, {
		name : 'employee'
	}, {
		name : 'bill2005',
		type : 'float'
	}, {
		name : 'bill2006',
		type : 'float'
	}, {
		name : 'bill2007',
		type : 'float'
	}, {
		name : 'bill2008',
		type : 'float'
	}, {
		name : 'orderDate',
		type : 'date'
	}

	],

	recordType : 'array',
	data : __TEST_DATA__
};

var colsOption = [ {
	id : 'no',
	header : "Order No",
	width : 60
}, {
	id : 'employee',
	header : "Employee",
	width : 80
}, {
	id : 'country',
	header : "Country",
	width : 70
}, {
	id : 'customer',
	header : "Customer",
	width : 80
}, {
	id : 'bill2005',
	header : "2005",
	width : 60
}, {
	id : 'bill2006',
	header : "2006",
	width : 60
}, {
	id : 'bill2007',
	header : "2007",
	width : 60
}, {
	id : 'bill2008',
	header : "2008",
	width : 60
}, {
	id : 'orderDate',
	header : "Delivery Date",
	width : 100
}

];
var gridOption = {
	id : "mygrid1",
	width : "100%", // "100%", // 700,
	height : c - header - 8, // "100%", // 330,
	container : 'gridbox1',
	replaceContainer : true,
	showGridMenu : true,
	allowCustomSkin : true,
	allowFreeze : true,
	allowHide : true,
	allowGroup : true,
	toolbarContent : 'nav | xls',
	dataset : dsOption,
	columns : colsOption,
	onHeadClick : function(event, headCell, colObj, grid) {
		alert("onHeadClick called " + headCell.innerText + " ...\n");
		return false;
	}
};
var mygrid1 = new Sigma.Grid(gridOption);
function grid1Show() {
	// mygrid.clearContent();
	mygrid1.render();
};